<template>
  <el-dialog
    title="评价详情"
    :visible.sync="dialogValue"
    width="1000px"
  >
    <div class="ap-detail">
      <div style="height: 300px;overflow:auto;">
        <div v-for="(item,index) in tableData" :key="index" class="box">
          <div class="f-r a-c j-b" style="margin-bottom: 16px">
            <div class="name">事项名称：{{ item.event }}</div>
            <div class="username">{{ item.createTime }}</div>
          </div>
          <div class="rate">
            <el-rate
              :value="item.score || 0"
              disabled
              :max="5"
              size="36px"
              show-score
              text-color="#ff9900"
              score-template="{value}"
            />
          </div>
          <div class="content">
            {{ item.comment }}
          </div>
          <div class="f-r j-e">
            <div class="username">评价人：{{ item.realname }}</div>
          </div>
        </div>
        <el-empty v-if="!tableData.length" description="暂无评价" />
      </div>
    </div>
  </el-dialog>
</template>

<script>
import crud from '@/mixins/crud'
import { http_intermediary_app } from '@/api/intermediaryApi'

export default {
  name: 'User1Add',
  mixins: [crud],
  data() {
    return {
      dialogValue: false,
      tableData: [

      ]
    }
  },
  methods: {
    open(item) {
      http_intermediary_app.read({
        projectId: item.projectId,
        intermediaryId: item.intermediaryId
      }).then(res => {
        this.tableData = res.data || []
      })
      this.dialogValue = true
    },
    onSave() {
      this.dialogValue = false
    }
  }
}
</script>
<style lang="scss">
.ap-detail {

  .custom-textarea .el-textarea__inner{
    background: #F5FAFD;
    border-radius: 18px 18px 18px 18px;
    opacity: 1;
    border: 1px solid #BFBFBF;
  }
  .box {
    background: #F5FAFD;
    border-radius: 18px 18px 18px 18px;
    opacity: 1;
    border: 1px solid #707070;
    padding: 33px;
    margin-bottom: 20px;
    .name {
      font-size: 26px;
      color: #202224;
    }
    .rate {
      margin-bottom: 16px;
    }
    .content {
      font-size: 20px;
      line-height: 26px;
      margin-bottom: 28px;
    }
    .username {
      font-size: 20px;
      color: #202224;
      line-height: 20px;
    }
  }
  .page-box {
    border: none;
  }
}
</style>
